package com.example.speeddating.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 *
 * @author tina
 * @since 2023-06-28 11:14:34
 */
@Getter
@Setter
@ToString
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * openid
     */
    @JsonIgnore
    private String openid;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date birthday;

    /**
     * 性别1为女0为男
     */
    private Byte sex;

    /**
     * 身高
     */
    private double height;

    /**
     * 地址
     */
    private String location;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 星座
     */
    private String constellation;

    /**
     * 微信联系方式
     */
    private String email;

    /**
     * 微信联系方式
     */
    private String password;

    /**
     * 自我介绍
     */
    private String introduce;

    /**
     * 通知的方式
     */
    private Byte notice;

    /**
     * 头像
     */
    private String avator;

    /**
     * 是否是管理员
     */
    @JsonIgnore
    private Boolean isadmin;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date createTime;

    /**
     * 上次登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date lastLoginTime;

    /**
     * 访客数
     */
    private Integer visitorNum;

    /**
     * 是否上线
     */
    private Boolean isOnline;

    /**
     * 是否隐身
     */
    private Boolean isHide;

    /**
     * 粉丝数量
     */
    @TableField(exist = false)
    private Integer fansNum;
    /**
     * 专业id
     */
    private Integer professionId;

    /**
     * 是否全部完善
     */
    private Boolean isComplete;

    /**
     * 是否分享过主页
     */
    private Boolean isShare;

    /**
     * 是否认证
     */
    private Boolean isAuthentic;

    /**
     * 桃花数量
     */
    @TableField(exist = false)
    private int taohuaNum;

    /**
     * 维度
     */
    private double latitude;

    /**
     * 经度
     */
    private double longitude;

    /**
     * 学校
     */
    private String school;

    /**
     * 学历
     */
    private String education;

    /**
     * 是否注销
     */
    @TableLogic
    @JsonIgnore
    private Integer deleted;

    private Byte status;

    @TableField(exist = false)
    private Boolean saw;

    /**
     * 访客表的id
     */
    @TableField(exist = false)
    private Long visitorId;

    /**
     * 文章
     */
    @TableField(exist = false)
    private Article article;

    /**
     * 是否为第一次注册
     */
    @TableField(exist = false)
    private Boolean firstInit;

    /**
     * 职业
     */
    @TableField(exist = false)
    private String career;

    /**
     * 轮播
     */
    @TableField(exist = false)
    private List<Photo> photoList;

    @TableField(exist = false)
    private Boolean isFollowed;


    @TableField(exist = false)
    private String realName;

    @TableField(exist = false)
    private String codeID;
}
